﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                assembly="Inovout.Cloud.DataWarehouse"
				       namespace="Inovout.Cloud.DataWarehouse.Models">

  <class name="DataCollection" table="DataWarehouse_DataCollection">
    <id name="Id" access="field.camelcase"
        column="DataCollectionId" type="Int32">
      <generator class="native" />
    </id>

    <property name="Name" unique="true"/>
    
    <property name="IsPublish"/>
    
    <!--<one-to-one name="DataView" constrained="true"/>-->
    <many-to-one name="Table" column="TableId"/>
    
    <set name="Properties" cascade="all">
      <key column="DataCollectionId" />
      <one-to-many class="DataCollectionProperty" />
    </set>
    
    <property name="DisplayProperties"/>
    
    <property name="CreatedTime" access="field.camelcase" />
    <property name="CreatedUserName" access="field.camelcase" />
    <property name="ModifiedTime" access="field.camelcase" />
    <property name="ModifiedUserName" access="field.camelcase" />
    <property name="AccessedTime" access="field.camelcase" />
    <property name="AccessedUserName" access="field.camelcase" />
    <property name="Memo" />
    <property name="IsInvalid" />
  </class>
</hibernate-mapping>